1. Field of the Invention
The present invention generally relates to a switching apparatus, and more particularly relates to a switching apparatus used as a member in a network.
2. Description of the Related Art
As shown in FIG. 1, in a network which is built up by connecting multiple layer 2 switching apparatuses, the ping function which transmits/receives control packets based on the Internet Control Message Protocol (ICMP) has been widely used to check the connection between switching apparatuses and to determine the amount of time required for connection.
The ping function is provided by OSI layer 3. As shown in FIG. 1, to confirm the reachability from a switching apparatus A to a switching apparatus B, a ping command is executed on the switching apparatus A with the IP address (10.21.137.222) of the switching apparatus B specified as the destination.
When the ping command is submitted to the switching apparatus A, the switching apparatus A transmits an ICMP request packet for the switching apparatus B to the network. When the switching apparatus B receives the ICMP request packet addressed to its own IP address, the switching apparatus B sends an ICMP reply packet to the switching apparatus A. By receiving the ICMP reply packet, the switching apparatus A confirms the reachability from the switching apparatus A to the switching apparatus B and determines the amount of time required for the connection.
Patent document 1 discloses an apparatus which performs connection tests by setting up virtual LANs (VLAN) with a layer 2 switching apparatus and by using the ping function.
Patent document 2 discloses a method of selecting an optimal route by determining response time for each VLAN using the ping function, and a LAN switch enabling this.
[Patent document 1] Japanese Patent Application Publication No. 2005-109827
[Patent document 2] Japanese Patent Application Publication No. 2004-080323
FIG. 2 is a drawing illustrating an exemplary process of receiving data packets in a switching apparatus having a quality of service (QoS) function. In FIG. 2, numbers in parentheses correspond to those in the description below. When a packet is input (1), the switching apparatus determines the internal priority level (high, intermediate, or low, for example) of the packet in the switching apparatus based on the priority class (0 through 7) stored in the VLAN tag (2), which is defined in IEEE 802.1Q. Then, the switching apparatus performs priority control on the packet as defined in IEEE 802.1p and transmits the packet (3). The switching apparatus has a packet buffer (queue) for each internal priority level. When the switching apparatus becomes congested with packets, lower priority packets are kept waiting in the packet buffers. In other words, transmission of those lower priority packets is delayed.
If the congestion is so severe that packets overflow from the packet buffers, those overflowed packets are discarded. By prioritizing the packets which go through the switching apparatus, the switching apparatus controls the packet transmission so that high priority packets go through the switching apparatus faster than other packets.
In a case where a packet did not arrive at an end user's apparatus or arrived after much delay, a network administrator checks if the apparatus is reachable and determines the response time by using the ping function based on ICMP as described above.
FIG. 3 is a drawing illustrating an exemplary process of transmitting an ICMP request packet in a switching apparatus. In FIG. 3, numbers in parentheses correspond to those in the description below. For example, the switching apparatus A specifies the IP address (for example, 10.21.137.222) of a destination switching apparatus (for example, the switching apparatus B) in an ICMP request packet, transmits the ICMP request packet to the network to check if the switching apparatus B is reachable (3), and then waits for an ICMP reply packet from the switching apparatus B (4).
FIG. 4 is a drawing illustrating an exemplary process of receiving an ICMP request packet in a switching apparatus. In FIG. 4, numbers in parentheses correspond to those in the description below. For example, the switching apparatus B determines whether the received ICMP request packet is addressed to the switching apparatus B itself by referring to the specified IP address (or MAC address). If the ICMP request packet is addressed to the switching apparatus B, it transmits an ICMP reply packet to the sender of the ICMP request packet (in this case, the switching apparatus A) (5).
In this way, it is possible to check if packets from the switching apparatus A can reach the switching apparatus B and to determine the packet response time between those apparatuses.
Besides for the failure analysis in a network currently in operation, the ping function can also be used when building a network or adding an apparatus to a network. For example, when an apparatus is added to a network, it may be necessary to check if the apparatus is correctly connected to the network, before starting a normal operation. In such a case, the connectivity of the apparatus can be confirmed based on the result of performing a ping test on the apparatus.
The ping function, however, has its limitations. Although the ping function serves as a tool to check if an apparatus is reachable, it cannot assess the reachability of normal data packets taking into account the effect of QoS at the layer 2 level.
For example, even when data packets are discarded or their delivery is delayed because those packets are treated as low priority packets, ICMP request packets for a ping test may be treated normally and ICMP reply packets may be returned without delay.
As a result, no problem may be identified in reachability and round-trip time. Thus, the limitations of the ping function have been making it difficult to identify problems in a network.
More precisely, for example, even if priority control in a switching apparatus is incorrect because of a setting error or a bug, the ping function cannot detect such a problem or perform a test to identify the problem.
The ping function does not refer to virtual local area network IDs (VLAN ID), and therefore cannot perform a ping test separately for each VLAN. For example, even if delivery delay occurs, in a route, only for packets with a certain VLAN ID, the ping function cannot analyze the situation.
Also, since ping reply packet transmission is not affected by QoS even when a network is congested with data packets, it is difficult to accurately determine packet round-trip time between switching apparatuses. Further, when transmitting ICMP packets from a switching apparatus, it has been difficult to perform a ping test taking into account the prioritization in that switching apparatus.